package me.ratel.demo.wechat.config;

/**
 * @author Administrator
 * @time 2016/7/22 23:37
 */
class ConfigurationWithHardCode implements Configuration {
//    private static final String appId = "wx08379b83fa805962";
//    private static final String appSecret = "4d0c055d9d7256bc49131bec149acc24";
//
//    private static final String mchId = "1357882102";
//
//    private static final String apiKey = "3520fc5282a8fd12ee4f4c1cae7d7e1e";

    private static final Integer refreshAccessTokenTimes = 3;
    private static final Integer refreshAccessTokenInterval = 1000;

    private static final String schema = "https";
    private static final String wehcatUrl = "api.weixin.qq.com";
    private static final String wehcatPayUrl = "api.mch.weixin.qq.com";
    private static final String wehcatOAuth2Url = "open.weixin.qq.com";

    private static final String tokenUrl = schema + "://" + wehcatUrl + "/cgi-bin/token";
    private static final String menuUrl = schema + "://" + wehcatUrl + "/cgi-bin/menu/get";
    private static final String unifiedOrderUrl = schema + "://" + wehcatPayUrl + "/pay/unifiedorder";
    private static final String orderQueryUrl = schema + "://" + wehcatPayUrl + "/pay/orderquery";
    private static final String unifiedOrderNotifyUrl = schema + "://" + "";
    private static final String oauth2AuthorizeURL = schema + "://" + wehcatOAuth2Url + "/connect/oauth2/authorize";
    private static final String snsOAuth2AccessTokenURL = schema + "://" + wehcatUrl + "/sns/oauth2/access_token";
    private static final String snsOAuth2RefreshTokenURL = schema + "://" + wehcatUrl + "/sns/oauth2/refresh_token";

    @Override public Integer getRefreshAccessTokenTimes() {
        return refreshAccessTokenTimes;
    }

    @Override public Integer getRefreshAccessTokenInterval() {
        return refreshAccessTokenInterval;
    }

    @Override public String getTokenURL() {
        return tokenUrl;
    }

    @Override public String getMenuURL() {
        return menuUrl;
    }

    @Override public String getUnifiedOrderURL() {
        return unifiedOrderUrl;
    }

    @Override public String getOrderQueryURL() {
        return orderQueryUrl;
    }

    @Override public String getUnifiedOrderNotifyURL() {
        return unifiedOrderNotifyUrl;
    }

    @Override public String getOauth2AuthorizeURL() {
        return oauth2AuthorizeURL;
    }

    @Override public String getSnsOAuth2AccessTokenURL() {
        return snsOAuth2AccessTokenURL;
    }

    @Override public String getSnsOAuth2RefreshTokenURL() {
        return snsOAuth2RefreshTokenURL;
    }
}
